﻿<%@ Page Language="C#" MasterPageFile="~/ffl/ffl.master" AutoEventWireup="true" CodeFile="alserveleaguetable.aspx.cs" Inherits="ffl_anonymous_alserveleaguetable" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Repeater runat="server" ID="LeagueTableRepeater">
        <HeaderTemplate>
            <table width="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="tableheader" style="width:5%">Pos.</td>
                    <td class="tableheader" style="width:30%">Manager</td>
                    <td class="tableheader" style="width:35%">Team</td>
                    <td class="tableheader" style="width:10%" align="center">Points</td>
                    <td class="tableheader" style="width:10%" align="center"><%# DateTime.Today.ToString("MMM") + "<br/>MoM" %></td>
                    <td class="tableheader" style="width:10%" align="center"><%# DateTime.Today.AddMonths(-1).ToString("MMM") + "<br/>MoM" %></td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td><%# Container.ItemIndex + 1 %></td>
                <td><%# DataBinder.Eval(Container.DataItem, "Forename") + " " + DataBinder.Eval(Container.DataItem, "Surname") %></td>
                <td>
                    <asp:HyperLink runat="server" ID="TeamNameHyperlink" 
                        Text='<%# DataBinder.Eval(Container.DataItem, "TeamName") %>'
                        NavigateUrl='<%# "~/ffl/user/mysquad.aspx?Id=" + DataBinder.Eval(Container.DataItem, "UserId") %>'></asp:HyperLink>
                </td>
                <td align="center"><%# DataBinder.Eval(Container.DataItem, "TotalPoints") %></td>
                <td align="center"><%# DataBinder.Eval(Container.DataItem, "ThisMonthPoints") %></td>
                <td align="center"><%# DataBinder.Eval(Container.DataItem, "LastMonthPoints") %></td>
            </tr>
        </ItemTemplate>
        <AlternatingItemTemplate>
            <tr>
                <td class="alternatetablerow"><%# Container.ItemIndex + 1 %></td>
                <td class="alternatetablerow"><%# DataBinder.Eval(Container.DataItem, "Forename") + " " + DataBinder.Eval(Container.DataItem, "Surname") %></td>
                <td class="alternatetablerow">
                    <asp:HyperLink runat="server" ID="TeamNameHyperlink" 
                        Text='<%# DataBinder.Eval(Container.DataItem, "TeamName") %>'
                        NavigateUrl='<%# "~/ffl/user/mysquad.aspx?Id=" + DataBinder.Eval(Container.DataItem, "UserId") %>'></asp:HyperLink>
                </td>
                <td class="alternatetablerow" align="center"><%# DataBinder.Eval(Container.DataItem, "TotalPoints") %></td>
                <td class="alternatetablerow" align="center"><%# DataBinder.Eval(Container.DataItem, "ThisMonthPoints") %></td>
                <td class="alternatetablerow" align="center"><%# DataBinder.Eval(Container.DataItem, "LastMonthPoints") %></td>
            </tr>
        </AlternatingItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
</asp:Content>

